<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/vue@next"></script>
    <title>Document</title>
</head>
<style>
.modal {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: white;
  width: 300px;
  height: 300px;
  padding: 5px;
}
</style>
<body>
  <div id="demo" style="position: relative;">
    <h3>Tooltips with Vue 3 Teleport</h3>
    <h3>单击按钮打开模态框，Vue 将正确地将模态框内容渲染为 body 标签的子级。</h3>
    <div>
      <modal-button></modal-button>
    </div>
  </div>
  <script type="module">
    import { ModalButton } from './js/main.js'
    const app = Vue.createApp({
      setup() {
          
          return {
              
          }
        }
    });
    app.component('modal-button', ModalButton)
    const vm = app.mount('#demo');
</script>
</body>
</html>